package org.luxor.commons.websocket.annotation;

import javax.websocket.Decoder;
import javax.websocket.Encoder;
import javax.websocket.server.ServerEndpointConfig;
import java.lang.annotation.*;

/**
 * WebSocketServer
 * <p>
 * 等同于@ServerEndpoint
 *
 * @author Mr.yan  @date 2021/8/6
 */
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface WebSocketServer {

    /**
     * 端点地址
     * 例如: "/websocket/chat"
     */
    String value();

    String[] subprotocols() default {};

    Class<? extends Decoder>[] decoders() default {};

    Class<? extends Encoder>[] encoders() default {};

    Class<? extends ServerEndpointConfig.Configurator> configurator() default ServerEndpointConfig.Configurator.class;

}
